import { Controller, Get, Query } from '@midwayjs/core';
import { SupplierDto } from '../dtos/supplier.dto';
import * as Mock from 'mockjs';
@Controller('/mes/supplier')
export class MesSupplierController {
  @Get('/getbyid')
  async getById(@Query('id') id: number): Promise<any> {
    // 这里直接返回一条模拟数据
    return {success:true,data:Mock.mock( {
        tenantType: 2,
        tenantId: 2,
        delState: 1,
        addUser: '李燕萍',
        addUserId: 1192,
        addTime: '2025-08-05 16:39:15',
        editUser: '李燕萍',
        editUserId: 1192,
        lastEditTime: '2025-08-05 16:39:15',
        serverNumber: 0,
        contactList: [
          {
            id: 7874,
            supplierId: 7900,
            manName: '杨丽君',
            age: 0,
            emotionalType: 0,
            personalityTraits: '',
            tel: '13925061340',
            fax: '',
            address: '瑞康路辅料时尚汇D062-63档',
            state: 1,
            otherFile: '',
            signingMan: 0,
            post: '',
            remarks: '',
            defaultMan: 5,
            orderNum: 0,
            tenantType: 2,
            tenantId: 2,
            delState: 1,
            addUser: '李燕萍',
            addUserId: 1192,
            addTime: '2025-08-05 16:39:15',
            editUser: '李燕萍',
            editUserId: 1192,
            lastEditTime: '2025-08-05 16:39:15',
            serverNumber: 0
          }
        ],
        supplierAddress: '瑞康路辅料时尚汇D062-63档',
        score: 0,
        firstScore: 0,
        id: 7900,
        name: '大丰五金',
        simpleName: '大丰五金',
        namePinyin: 'DFWJ',
        code: 'SU41161',
        supplierPositioning: 0,
        userName: '',
        accountId: 0,
        qcType: 0,
        grade: 0,
        areaId: 0,
        areaName: '',
        supplierType: 2,
        factoryType: 0,
        paymentType: 7,
        payType: 1,
        develPayType: 0,
        invoiceType: 0,
        invoicingType: 0,
        canInvoice: 0,
        invoicingPoint: 0,
        taxCode: '',
        acccountName: '',
        outgoingRatio: 0,
        productGrade: 0,
        outgoingType: 0,
        designType: 2,
        bankName: '',
        bankAccount: '',
        addressTel: '',
        productClassId: 0,
        productClassIdPath: '',
        classId: 1600,
        classIdPath: '0,1600',
        mainClassType: 0,
        imgUrl: '',
        localClassId: 0,
        localClassName: '',
        localClassIdPath: '',
        shieldType: 1,
        lqcType: 0,
        startCooperationTime: '1970-01-01 00:00:00',
        mainForceType: 0,
        introduceUserName: '',
        companyName: '大丰',
        qcRange: 0,
        state: 5,
        authCode: 'SZQ25089162',
        goodType: 0,
        highType: 0,
        summaryComment: '',
        remarks: '',
        companyKey: 'c_2_2'
      })}
  }
}